package com.relytosoft.mizar.media.camera.services.api.impl;

import com.relytosoft.mizar.media.camera.api.entity.Multimedia;
import com.relytosoft.mizar.media.camera.api.feign.MultimediaFeignInService;
import com.relytosoft.mizar.media.camera.services.service.MultimediaService;
import com.relytosoft.mizar.media.common.entity.pojo.dto.AlarmDto;
import com.relytosoft.mizar.media.common.enums.ResourceTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wss
 * @version 1.0
 * @date 2022/6/15 10:20
 */
@Service
public class MultimediaFeignInServiceImpl implements MultimediaFeignInService {

    @Autowired
    private MultimediaService multimediaService;

    @Override
    public void save(AlarmDto alarmDto, ResourceTypeEnum resourceTypeEnum) {
        Multimedia multimedia = Multimedia.buildMultimedia(alarmDto, resourceTypeEnum);
        multimediaService.save(multimedia);
    }
}
